<template>
	<view v-if="!lists.length" class="zanw">
		<view class="">亲，记得浏览商品呦</view>
	</view>
	<view class="myfoot" v-if="lists.length">


		<view v-for="(item,index) in lists" class="foot_child">
			<view class="bigs">
				<view class="footimg">

					<image :src="item.shop.pic" mode=""></image>
				</view>
				<view class="footcenter">
					<view class="sots">
						<view class="footcenter_top">
							{{item.shop.prodName}}
						</view>
						<view class="footcenter_bottom">
							{{item.shop.brief}}
						</view>
					</view>

					<view class="times">{{times2(item.times)}}</view>
				</view>
			</view>



		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				lists: []
			}
		},
		methods: {
			times2(date) {
				console.log(date, 's111111');
				var json_date = new Date(date).toJSON();
				return new Date(+new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(
					/\.[\d]{3}Z/, '')


			}
		},
		onLoad() {
			this.lists = uni.getStorageSync("Tracks")

		},
	}
</script>

<style>
	.zanw {
		width: 100%;
		height: 100%;
		background: white;
		display: flex;
		justify-content: center;
		align-items: center;

	}

	.times {
		width: 100%;
		justify-content: flex-end;
		display: flex;
		align-items: flex-end;
		padding-right: 15px;
		box-sizing: border-box;
	}

	.bigs {
		height: 100%;
		width: 100%;
		display: flex;
		flex-direction: row;
		margin-left: 10px;
	}

	.myfoot {
		padding-top: 10px;
		width: 100%;
		height: 100%;
		background: white;
	}

	.footcenter_bottom {
		width: 100%;
	}

	.foot_child {
		height: 30vw;
		width: 100%;
		border-bottom: 1px solid #ccc;
		margin-top: 10px;
		padding-bottom: 10px;
	}

	.footimg {
		width: 30%;
		height: 100%;
	}

	.footimg>image {
		width: 100%;
		height: 80%;
	}

	.footcenter {
		width: 85%;
		padding-left: 10px;
		display: flex;
		flex-wrap: wrap;

	}

	.sots {
		height: 70%;
		width: 100%;
		display: flex;
		align-content: space-between;
		flex-wrap: wrap;
	}

	.footcenter_top {
		word-break: break-all;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		padding-right: 10px;
		padding-top: 5px;
		box-sizing: border-box;
		width: 90%;
	}
</style>
